﻿using System.Collections.Generic;
using System.Runtime.Serialization;

namespace HCMS.CommonDtos
{
    /// <summary>
    /// 管理系统 菜单树
    /// </summary>
    [DataContract(Name = "manageMenuTree")]
    public class ManageMenuTreeDto
    {
        /// <summary>
        /// 菜单 Id
        /// </summary>
        [DataMember(Name = "id")]
        public int Id { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [DataMember(Name = "title")]
        public string Title { get; set; } = "";

        /// <summary>
        /// 图标
        /// </summary>
        [DataMember(Name = "icon")]
        public string Icon { get; set; } = "";

        /// <summary>
        /// 类型
        /// </summary>
        ///<remarks>
        /// 0：导航菜单、1：链接菜单
        /// </remarks>
        [DataMember(Name = "type")]
        public int Type { get; set; }

        /// <summary>
        /// 打开方式
        /// </summary>
        /// <remarks>
        /// _iframe：iframe 打开
        /// </remarks>
        [DataMember(Name = "openType")]
        public string OpenType { get; set; } = "";

        /// <summary>
        /// 链接
        /// </summary>
        [DataMember(Name = "href")]
        public string Href { get; set; } = "";

        /// <summary>
        /// 子级 菜单
        /// </summary>
        [DataMember(Name = "children")]
        public List<ManageMenuTreeDto> Children { get; set; } = new List<ManageMenuTreeDto>();
    }
}
